<?php
class General_Debug {
	private static $debugInstance = null;

	private function __construct() {

	}

	public static function getInstance() {
		if (self::$debugInstance == null) {
			self::$debugInstance = new General_Debug();
		}

		return self::$debugInstance;
	}

	public function printMessage($scope, $debugType = 'print_r') {
		echo '<pre>';
		switch ($debugType) {
			case 'var_export':
				var_export($scope);
				break;
			case 'print_r':
			default:
				print_r($scope);
			break;
		}

		echo '</pre>';
	}
}

function simpleDebug($scope, $debugType = 'print_r'){
	General_Debug::getInstance()->printMessage($scope, $debugType);
}
?>